package com.medicine.product.study.singleton;

/**
 * @author lynn
 * @version 1.0
 * @date 2022/2/14
 */
//静态内部类
public class StaticSingleton {

    private static class SingletonHolder{
        private static final StaticSingleton instance = new StaticSingleton();
    }

    private StaticSingleton(){

    }

    public static final StaticSingleton getInstance(){
        return  SingletonHolder.instance;
    }
}
